package cn.exrick.xboot.modules.your.dao.mapper;

import cn.exrick.xboot.modules.your.entity.Bed;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 陪护床数据处理层
 * @author chenyunxuan
 */
public interface BedMapper extends BaseMapper<Bed> {

    @Select("select a.*,b.region_name from es_bed a left join es_region b on a.hospital_id=b.id ${ew.customSqlSegment}")
    IPage<Bed> pageBed(Page initMpPage, @Param(Constants.WRAPPER) QueryWrapper<Bed> qw);
}